#include <opencv2/opencv.hpp>
#include <iostream>
#include <vector>

using namespace cv;
using namespace std;

int main()
{

    vector<Vec2f> point;

    Mat img=imread("/home/lwj/opencv.21/2.png");
    if(img.empty())
    {
        cout<<"flase"<<endl;
        return -1;
    }
    Mat edge,lines;
    Canny(img,edge,80,180,3,false);
    threshold(edge,edge,150,255,THRESH_BINARY);//二值化
    for(int i=0;i<edge.rows;i++)
    {
        for(int j=0;j<edge.cols;j++)
        {
           point.push_back( Point2f (point[i][j]));
        }
    }
    double rhoMin=0.0f;
    double rhoMax=360.0f;
    double rhoStep=1;
    double thetaMin=0.0f;
    double thetaMax=CV_PI/2.0f;
    double thetaStep=CV_PI/180.0f;
  
    //HoughLinesPointSet(point,lines,20,1,rhoMin,rhoMax,
    rhoStep,thetaMin,thetaMax,thetaStep);
    imshow("11",lines);
    imshow("22",edge);
    waitKey(0);
    return 0;
}
